
const Controller = require('egg').Controller;

function toInt(str) {
    if (typeof str === 'number') return str;
    if (!str) return str;
    return parseInt(str, 10) || 0;
}

class UserController extends Controller {
    async find() {
        const ctx = this.ctx;
        console.log(ctx.query)
        ctx.body = await ctx.model.User.findById(ctx.query.id);
    }


}

module.exports = UserController;